<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<title>网上购票</title>
<link rel="stylesheet" href="resources/css/frozen.css">
<link rel="stylesheet" href="resources/css/main.css">
<script src="resources/lib/zepto.min.js"></script>
<script src="resources/js/frozen.js"></script>
<script src="resources/js/config.js"></script>
<script src="resources/js/main.js"></script>

</head>
<body ontouchstart="">
	<header class="ui-header ui-header-positive ui-border-b">
		<i class="ui-icon-return" onclick="location='index.html'"></i>
		<h1>选择日期</h1>
	</header>
	<section class="ui-container">
		<section id="bus-date-container" class="ui-selector">
			<br/>
			<ul id="bus-date-list" class="start-station ui-list ui-list-text ui-list-cover ui-border-tb">
			</ul>
		</section>
	</section>

<script>
(function (){
	// 加载日期
	var nowDate = new Date();
	for(var i=0; i<=sessionStorage.sellDay; i++) {
		var date = new Date(nowDate.valueOf() + 1*24*60*60*1000*i);
		$('#bus-date-list').append(
			'<li class="ui-border-t">' + formatDate(date) + '</li>'
		);
	}
	
	// 日期列表点击事件
    $(document).on("tap", "#bus-date-list li", function(){
		sessionStorage.busDate = $(this).html();
		location.href = "index.html";
	});
	
	// 底部主菜单初始化
	initFooter("#footer");
})();
</script>
</body>
</html>